" Vim syntax file
" Language:	Quickfix window
" Maintainer:	Bram Moolenaar <Bram@vim.org>
" Last change:	2001 Jan 15

" Quit when a syntax file was already loaded
if exists("b:current_syntax")
  finish
endif

" A bunch of useful C keywords
syn match	qfFileName	"^[^|]*" nextgroup=qfSeparator
syn match	qfSeparator	"|" nextgroup=qfLineNr contained
syn match	qfLineNr	"[^|]*" contained contains=qfError

syn match	qfPrompt	"^||\s*\[.*\].*$" contains=qfShType,qfShDir,qfShFile
syn keyword	qfShType	Shell VimEx Empty contained
syn match	qfShFile	":.*\]"hs=s+1,he=e-1 contained
syn match	qfShDir		"@[^:]*"hs=s+1 contained
syn match	qfShellcmd	"^||\s+\+\s.*$"
syn match	qfShInnercmd	"^||\s>>.*$"
syn match	qfShInterrupt	"^||\sVim:Interrupt\s*$"
syn match	qfShFail	"^||\sExecuteCommand failed:.*$"
syn match	qfShFail	"^||\s.*at\sfunction.*$"
syn match	qfVimFail	"^||\s.*:E\d\+:.*$"
syn match	qfInfo		"^||\s[Ii][Nn][Ff][Oo]:\?.*$"
syn match	qfError		"^||\s[Ee][Rr][Rr][Oo][Rr]:\?.*$"
syn match	qfError		"^||.*[Ee][Rr][Rr][Oo][Rr]:\?\s*\d\+.*$"
syn match	qfWarning	"^||\s[Ww][Aa][Rr][Nn][Ii][Nn][Gg]:\?.*$"
syn match	qfWarning	"^||.*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]:\?\s*\d\+.*$"
syn match	qfExample	"^||.*[Ee][Xx][Aa][Mm][Pp][Ll][Ee]\s*\d\+:\?.*$"
syn match	qfUsage 	"^||.*[Uu][Ss][Aa][Gg][Ee]:\?.*$"

" The default highlighting.
hi def link qfFileName		Directory
hi def link qfLineNr		LineNr
hi def link qfError		Error
hi def link qfInfo		MoreMsg
hi def link qfWarning		WarningMsg

hi def	    qfShellcmd		ctermfg=green guifg=green
hi def	    qfUsage		ctermfg=blue guifg=blue
hi def	    qfExample		ctermfg=yellow guifg=yellow
hi def	    qfPrompt		ctermfg=darkblue guifg=darkblue
hi def	    qfShType		ctermfg=darkred guifg=darkred
hi def	    qfShDir		ctermfg=darkmagenta guifg=darkmagenta
hi def	    qfShFile		ctermfg=darkcyan guifg=darkcyan
hi def	    qfShInnercmd	ctermfg=gray guifg=gray
hi def	    qfShInterrupt	ctermfg=red guifg=red
hi def	    qfShFail		ctermfg=red guifg=red
hi def	    qfVimFail		ctermfg=red guifg=red

let b:current_syntax = "qf"

" vim: ts=8
